import axios from "@/utils/http"

export  function  test(obj:any){
    return axios({
        url:"/back/question/query",
        method:"post",
        data:{
            "paperId": obj.paperId,
            "title": obj.title,
            "limit": obj.limit,
            "page": obj.page,
        }
    })
}

// 添加
export function addti(obj:any){
    return axios({
        url:"/back/question/add",
        method:"post",
        data:{
            "answer": obj.answer,
            "optionA": obj.optionA,
            "optionB": obj.optionB,
            "optionC": obj.optionC,
            "optionD": obj.optionD,
            "paperId": obj.paperId,
            "title": obj.title
        }
    })
}
// 删除
export function deleteid(id:any){
    return axios({
        url:`/back/question/delete/${id}`,
        method:"DELETE"

    })
}

//查询
export function Querying(obj:any){
    return axios({
        url:"/back/question/query",
        method:"post",
        data:{
            "paperId": obj.paperId,
            "title": obj.title,
            "limit": obj.limit,
            "page": obj.page,
        }
    })
}